import "https://code.jquery.com/jquery-3.6.0.js";
import "https://cdn.bootcdn.net/ajax/libs/jquery.lazyload/1.9.1/jquery.lazyload.js";
import { cookie } from "./tool.js";
import { head } from "./head.js";
$(".head").load("http://localhost/my-wangyi/frontend/header1.html",function(){
    head();
    if (cookie.get("xingming")) {
        $(".admin").hide();
        $(".login").show();
        $(".login span").html(cookie.get("xingming"));
      }
      $('.login a').on('click',function(){
        $(".admin").show();
        $(".login").hide();

        cookie.remove("xingming");
        window.location="http://localhost/my-wangyi/frontend/registry.html"
      });
      
});
$(".foot").load("http://localhost/my-wangyi/frontend/footer.html");

import { Registry } from "./registry.js";
if(document.querySelector("#registry")){
    new Registry().init();
}
import { Index1 } from "./index1.js";
if(document.querySelector(".mod2-2_main")){
    new Index1().init();
}
import { Mylist } from "./list.js";
if(document.querySelector("#list")){
    new Mylist().init();
}
import { Detail } from "./detail.js";
if(document.querySelector("#detail")){
    new Detail().init();
}
import { Cartlist } from "./cartlist.js";
if(document.querySelector(".cart")){
    new Cartlist().init();
}